home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / plnk081.zip / pilot-link.0.8.1 / Java / doConstants.c next >
Text File  |  1997-08-05  |  1KB  |  72 lines

  1. #include <stdio.h>
  2. #include "pi-source.h"
  3. #include "pi-dlp.h"
  4. #include "pi-socket.h"
  5.  
  6. FILE * f;
  7.  
  8. void w(char * name, int value) {
  9.     fprintf(f, "    public static int %s = %d;\n", name, value);
  10. }
  11.  
  12. #define W(x) w(#x, x);
  13.  
  14. int main(int argc, char*argv[]) {
  15.     f = fopen("Pdapilot/constants.java", "w");
  16.     
  17.     fprintf(f, "\
  18.  
  19. package Pdapilot;
  20.  
  21. public class constants {
  22. ");
  23.  
  24.     W(dlpDBFlagResource)
  25.     W(dlpDBFlagReadOnly)
  26.     W(dlpDBFlagAppInfoDirty)
  27.     W(dlpDBFlagBackup)
  28.     W(dlpDBFlagOpen)
  29.     W(dlpDBFlagNewer)
  30.     W(dlpDBFlagReset)
  31.     
  32.     W(dlpRecAttrDeleted)
  33.     W(dlpRecAttrDirty)
  34.     W(dlpRecAttrBusy)
  35.     W(dlpRecAttrSecret)
  36.     W(dlpRecAttrArchived)
  37.     
  38.     W(dlpOpenRead)
  39.     W(dlpOpenWrite)
  40.     W(dlpOpenExclusive)
  41.     W(dlpOpenSecret)
  42.     W(dlpOpenReadWrite)
  43.     
  44.     W(dlpEndCodeNormal)
  45.     W(dlpEndCodeOutOfMemory)
  46.     W(dlpEndCodeUserCan)
  47.     W(dlpEndCodeOther)
  48.     
  49.     W(dlpDBListRAM)
  50.     W(dlpDBListROM)
  51.     
  52.     W(PILOT_LINK_VERSION)
  53.     W(PILOT_LINK_MAJOR)
  54.     W(PILOT_LINK_MINOR)
  55.     
  56.     W(PI_AF_SLP)
  57.     W(PI_AF_INETSLP)
  58.     W(PI_PF_SLP)
  59.     W(PI_PF_PADP)
  60.     W(PI_PF_LOOP)
  61.     W(PI_SOCK_STREAM)
  62.     W(PI_SOCK_DGRAM)
  63.     W(PI_SOCK_RAW)
  64.     W(PI_SOCK_SEQPACKET)
  65.  
  66.     W(AF_INET)
  67.  
  68.     fprintf(f, "}\n");
  69.     
  70.     return 0;
  71. }
  72.